<template>
  <div class="containers">
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="工单池" name="pool">
            <search :options="options" @searchParams='searchParams'></search>
            <poolTables :tableData="tableData"></poolTables>
          </el-tab-pane>
          <el-tab-pane label="我的发起" name="begin">我的发起</el-tab-pane>
          <el-tab-pane label="我的代办" name="handle">我的代办</el-tab-pane>
        </el-tabs>
  </div>
</template>

<script>
// import menuTitle from './components/menuTitle.vue'
import search from './components/search.vue'
import poolTables from './components/poolTable.vue'
export default {
  data() {
    return {
        options: [{
            value: '1',
            label: '待接单'
            }, {
            value: '2',
            label: '处理中'
            }, {
            value: '3',
            label: '已完成'
            }, {
            value: '4',
            label: '已撤销'
            }],
        tableData: [{
          recordDate: '2016-05-02',
          planName: '王小虎第一次巡检',
          dayNum: '2',
          objectName: '王小虎',
          headName: '王小虎',
          planTime: '2:00-3:00',
          trolTime: '2:00-3:00',
          costTime: '2h',
          status: '已完成'
        },{
          recordDate: '2016-05-02',
          planName: '王小虎第一次巡检',
          dayNum: '2',
          objectName: '王小虎',
          headName: '王小虎',
          planTime: '2:00-3:00',
          trolTime: '2:00-3:00',
          costTime: '2h',
          status: '已完成'
        },{
          recordDate: '2016-05-02',
          planName: '王小虎第一次巡检',
          dayNum: '2',
          objectName: '王小虎',
          headName: '王小虎',
          planTime: '2:00-3:00',
          trolTime: '2:00-3:00',
          costTime: '2h',
          status: '已完成'
        },{
          recordDate: '2016-05-02',
          planName: '王小虎第一次巡检',
          dayNum: '2',
          objectName: '王小虎',
          headName: '王小虎',
          planTime: '2:00-3:00',
          trolTime: '2:00-3:00',
          costTime: '2h',
          status: '已完成'
        },{
          recordDate: '2016-05-02',
          planName: '王小虎第一次巡检',
          dayNum: '2',
          objectName: '王小虎',
          headName: '王小虎',
          planTime: '2:00-3:00',
          trolTime: '2:00-3:00',
          costTime: '2h',
          status: '已完成'
        },],
        activeName: 'pool'
    };
  },
  components: {
      search,
      poolTables
  },
  mounted() {
  },
  methods: {
      searchParams(data) {
          console.log(data)
      },
      handleClick(tab, event) {
        console.log(tab, event);
      }
  }
};
</script>

<style lang="less" scoped>
/deep/ .el-divider--horizontal {
        margin: 10px 0;
}
/deep/ .el-tab-pane {
  background: #fff;
}
.containers {
  background: #fff;
  width: 100%; 
  }
</style>
